<script setup>
import { useRouter } from 'vue-router'
import { ref } from 'vue'
let router = useRouter();
let username=window.sessionStorage.getItem('username');
function loginout(){
        window.sessionStorage.removeItem('username');
        router.push('/login');
    
}

</script>


<template>
    <h1>Home Component</h1>
    <button @click="loginout()">退出登录</button>
</template>
    